fix bug in tool/autotag