fixed bug with dismiss gallery in ios8 releasee version