Add fix from Simo for bug #5540 - missing code to substitute