Are you sure the autogen is completely successful if it returns non-zero?