Fixes bug where drawing function drawed incorrect number of pixels for
sprites