Fixing OC7 js errors

see #241