fixed stdclass validation