Added flush to host mod function