Fix javascript errors in the doodle plugin for example