Fixed access permission for delete link

and some bugs too