Make label switching more robust by handling a couple of edge cases