Fixed Bugs with NSUserDefaults.