Fixed an error on iOS