fixing page boundaries issue