Fixes to issues due to a bad rebase