fixes dowsanjack/textcomplete#2, fixes dowsanjack/textcomplete#4, reference to #dowsanjack/textcomplete#3