fixing logic with enflating spaceless middleware response