Fixes for a couple of issues