Fix up scala refs, for better results