fixes for 806ff98080677f1ca46458cf82e128df1d3819c0