Fixes for instance handling