changes to make it work on both simulators (ios7 and ios6)