Model: Fix database connect error