fixes bug to prevent double page scroll