fix JS compat