fixing references
random error fixing