fixed cout bug