Need to go back at some point and fix this for real. (cherry picked from commit dfe07df87ba82216a6ed1b6677f4f525c851ec03)