Fixed minor bug in counting stars