edit / add mode bug fix, total bug fix