Fix a few issues with loading variables on startup.