patch from Christian: use $? instead of $<