Small adjustments to make it work