Fixes #21 - made replace use PUT