Not only the bookies, majority of gamblers believed that Barcelona would win Rayo and they lost their bet. This is the reason why no team should be underestimated because no one can predict the future. I couldn't believe that Barcelona almost lost that game. Rayo has poor finishing and couldn't score more goals. A lot of work needs to be done in Barcelona defense because it looks porous to me.
Barcelona can probably address this weakness now, as they will certainly not be in the same situation again in their next match, as every team always makes improvements after weaknesses revealed in previous matches. Furthermore, Barcelona will welcome Valencia to their home ground, so they will certainly do their best to win against an underperforming opponent. However, if Barcelona manages to get another point in that match, it will be clear they haven't improved their defense, but I'm not convinced of that, as they are a team with a strong mentality to improve.