Fixes to make the code compile