Fixed some counting issues