more thorough fix of #4