fix to run on iOS