add extra dependency and fix bug