Fixed last linker options and few run time errors.