only draw background if needed