Reference error removal