Updating JS to use correct keys