fixing logic for action link