Fixed more referencing issues