Fixed error in one of my util meathods