Fixed issue with flickering on jQuery scroll