fix compilation and prints