add flush call after merge
flush implemented properly
Merge branch 'dev'