fixing bunch of bugs with ios