fixed stage3 script to do the full link