Fixed bug in contact manager