fixed some bugs with scroll