Some minor fixes for the new branch