merge of legacy heightfix with new source

as a marker: BUILD9 is the last variant of 3.960 without this code