Minor changes to fix some issues