Updates to TagPermissions, better handling of NULL parameters for several stored procedures