BUG Fixed issue with flushing at the root level