Fix for weird UDT return behavior