fixed middleware issue resulting in empty objects being posted