Reference mess fixed