fixed type refs declaration error reporting, fixed depth test enabling while painting 3d scene