fixed bugs in create and edit todo