A few minor fixes following implementation of Shi's changes

Following 403d9b56c52211fa19fe1e93bf82f5e10e3577c4 just a few tweaks