#142 Return correct type.

Previously the cast of the object was performed but the return type
didn't reflect that. So surrounding code that needed the cast would
break.
Merge pull request #143 from icon-Systemhaus-GmbH/master

#142 Return correct type.