Replace statement each time, instead of appending

Fixes #17