FIX Back port of bug fixes and enhancements from silverstripe.org/forum