Bug fix for single-instance check.