Minor clean-up / bug fixing