one fix and minor improvements