several smaller fixes to spiro code