Fix bug where it sends POST rather than PUT