small fix for multiple database with a template