Fix issue with drawing with user defined types.