Incremental fixes to work with newer version of SPA.