Changed flush in order to flush always