Fixed issue with auto-loading references