fixed bug with external operation error handling