re-applied 5562 and 5563 by reverting 5564
Authored by: erikb78 2011-09-26
Parent: [r5566]
Child: [r5568]