fix flex ios compatibility