Fixed input completion bugs