All of the above. Lube the o-ring! You need to work out exactly where the leak was from. It might not have been either filter or sump plug.....

Oh, and a trick to removing the filter when doing a service (and I almost always forget this myself!) is to loosen the filter before you warm the bike up to drain the oil. It's much much much easier to loosen when cold.