init range and other fixes