Bugfix pointed out by Miodrag on phpclasses for non-object result freeing.