fix bug #54

https://github.com/theshock/libcanvas/issues/54