Fixed bug with database regions (closed #9)