Update scroll_if_needed; things are still buggy.