syntax bug fix for graphics.js