Corrected some PHP notices involving uninitialized variables and indexes