Fixes to the latest code