undef vs 0 fixes in rest logic - #67