#369: fixed: undefined method id for nil:NilClass: