fix function name in js