Fixed Exception when viewport size is exactly equal to padding.