fixed a bug in utils