fix JS object error