fixed a bad function call