fixed exception reported a better way