Fixed some annoying bugs that occured in iOS7