Fixed a bug that can throw a PHP E_NOTICE, meaning the procedure never f...

...inishes and all fields are deleted.