fixed scroll reset issue, removed debug code