Fixed undefined/0 bug in domappend