Impemented a few fixes for ios7