Fixed some bugs on the iPhone