Fix CRAFTERCMS-847

See issue for further instructions