Add some missed returns in a couple of functions