changed/cleaned error-message handling