Fixed bug that possibly loses error information
Fix for my fix