fixed issue with accidently reassinging references