update some code for Elgg 1.9