Small fix to bug that appears when code is compiled without DNDEBUG