fix of POST and PUT methods