Fixed invalid references