Slight modification to drawing code.