minor logic tidy up
3 files changed