fixed null params issues in link logic