Fixed some bugs with iphone 4