fix for ios6 compatibility