some fixes to make V 1.7.1 work