added the flush and it works