Work around for the database name length bug in gateway.