Style tweak.
Bugfix and tiny optimisation.