Fixed a crash bug with calculating armor