fixing issue https://github.com/clementfarabet/gfx.js/issues/20