bug fixing for iOS