Small logic cleanup