add query deal
fix some bug