Fix calcdep, mistake in level calc