Fix utils

Minor fixes to utils