Fixed a major bug where $databases was being appended to