applied patch from 01f6e055