Solve link problems and fix for #3