POST/PUT bug fix