Fixed output just printing one line.