ios8 compatibility fix