Fix printing weird output before each prompt