Fixed errors

Checked if temporaryData is an array, and fixed reference to stdClass.