Fixed a few potential crashes with the form view controller.