Update utils.py

A little safer