fixed incorrect use of "instanceof" in labels