Added fix from fork commit  fd6b65509a002e816b4bafafa700ffb5925a144e