fix bad function call