Add function to detect instances.
Small change.