bug fix and improve completor