Fix drawBox method (thanks Adrian/aijii)