fix for JS compat