Fixes infinite loop in getLabel