Fix base case simulation error in code