Fix crash when running from jar