Fix some compiler warnings: Uninit var and div/0.