Fixing #634. Modified exception calls of possible not defined attributes. Closes #634 See merge request !228