Added nested else to recent_error condition