fixed referencing error