fix for instance detection