Fix the condition for displaying edit/delete links