bug fixes for POST