Now a days, more and more of social network data are being published in one way or other. So, preserving privacy in publishing social network data has become an important concern. With some local knowledge about individuals in a social network, an adversary may attack the privacy of some victims easily. Most of the work done so far towards privacy preservation can deal with relational data only. However, Bin Zhou and Jian Pei proposed a scheme for anonymization of social networks, which is an initiative in this direction and provides a partial solution to this problem. In fact, their algorithm cannot handle the situations in which an adversary has knowledge about vertices in the second or higher hops of a vertex, in addition to its immediate neighbors. In this paper, we propose a modification to their algorithm for the network anonymization which can handle such situations. In doing so, we use an algorithm for graph isomorphism based on adjacency matrix instead of their approach using DFS technique. More importantly, the time complexity of our algorithm is less than that of Zhou and Pei.