samll viewport bug fixes