Attempted factorial fix