Fixed NSUserDefaults issue

NSUserDefaults were not being set correctly