Small fixes to make STI working correctly