Fix CRAFTERCMS-560
See issue for further instructions