Fixed queue issues with DatabaseManager.