Updated to work with recent SOM changes