Changed logic to prevent double redraw Fixes #58
Added replace all example