Fix for bug in commit d7202056332a1ddd9088c31ebb75cc90b10c6130