fix bug in scroll event