bug fixed.Edit checking added.