fixing first page load issue