Better controller name detection