Updated linker flags; partially fixed potential issue