Added InvalidOperation exception