Fixes a PHP notice
Minor API fixes