Changed error handling in ObjectUtils + ShellWithTextIsActive. Fixes #644.