Fixing crash in pre-5.0 devices