Page load bug fix