Adding @lusis' changes.