fix for invalid JS