fixes a bug in utils