Fix bug in defun, reported by abeaumont