Multiple fixes

TypeError replaced with NotPossibleError, changes in logic, extra
operations for resource