Fixed some problems with delete and edit buttons