quick correction of js syntax