minor cleaning-up and safeguard