fixes empty anonymous javascript function