Fixing PHP warnings
Fixing query (addin iid instead of id)