fix issues with NULL entry and PUT request