Added page bounder check in case dialog overflow

Added bounder check in case dialog overflow