fix bug in scala reference