fixes wrong output