Fix: functions have to be total