Fixes a class comparison error