IIA engine bug fix, need to brush up on my PHP.