Nadal survives bad day at office