Fixed: writing result stream for single value query