fix references lenght