fix scroller bug where getAttribute('type') returns null