Fixing bug when on first page