Fix wrong output to console