Fixed a crash on 4.0