Some bug fixes for the previous commit (r21573).
Authored by: bugman 2013-11-21
Parent: [r21573]
Child: [r21575]