Fix incorrect call to function