Fixes bug with tab-completion when typing partial commmand.