fixed 2nd bug in sketch.js