support ios7 and fix bug