a further fix for better exception handling