Although the economy had stabilised and partly recovered from the 1997 crisis by 2004, unemployment and poverty remained high. The Indonesian Constitution was amended to provide for the direct election of the president, and Megawati stood for a second term. She consistently trailed in the opinion polls, due in part to the preference for male candidates among Muslim voters, and due to what was widely seen as a mediocre performance in office. Despite a somewhat better than expected performance in the first round of the elections, she was defeated by SBY in the second round.