Fix javascript trigger