Ensured that graphs dictionary initializes properly