fix

fixed sometimes referencing nil values