Fix segfault when setting scale to auto