fix check for commonjs