Finished fix for CRAFTERCMS-764.