Fix bugs with put/patch routes.