Fix some bugs, add new field