Application doesn't crash anymore. Also orientation handling is fixed.