Fix random location generation with offset != 0