more fixes. scala enum replaced by java enum