fixed Javascript interoperation