Drawing logic improvement.