Fix error reported from console; bad function calls