correction of connectDatabase