fixed error call function