Fixes for doPost and doGet