Fixed typo

There was a typo in condition that checks if scope id has been set.