We really should do this in the Python controller.