Reference error fix for handlePUT