bugfix from v3 tracking branch!