Fixed some issues in iOS