fix crashing below iOS6