fix bug in utils