some updates to accommodate issues with ios7 sdk