Minor changes to utility functions