Fix for correctly capturing error