Fix a couple of crashes

Battles would crash when it would try to check the property of null eg. targets[1].fainted