fixed mask updating issue
added tail and lead selection to trace dialog