fix scroll flags not reset bug