more fixes taken from autoupdate