When checking if entity is an app or widget, use indexOf 'internal/widget'
instead of just 'widget' - fixes #5