fixing overflow issue ios7