Fix printf returning length