applied patch from master