fix the api controller put method