Fixes to utils