Fixed printf bug