Fix error when --include-js turned on