Improved some utilities