add & fix some bug