fix bug with viewport