Fixed some issues with ios 8