Real Madrid made it hard for themselves before edging out Celta Vigo at the Bernabeu