result flushing error fixed