Fixing bug on iOS