Fixed mismatched entity count crash