Fix NPE on OS X when -auto is used.