fixed linkscript, and other things