Fixed bug in utils