Some fixes made for inclusion into the VIP Shared Plugins repo