Fixes 
1. scheduleDeferred when invoked not in main ui thread 
2. broken request body encoding.