Fixed formatted output for functions