Fix segfault when height is less than retarget interval