Fix to issue 317