Fixed jittery refresh bug