scrollTop null error during switch pane