fix in newer js versions