applied lars fixes manually