fixes to the apply links for edge cases