fix various rendering issues