fixing a bug in saving a user