fix drag bug and add cancel buttons