US, S&P had doubts on rating