fixed output problems