fixed output buffering