fixed output redirect