Fixes for PHP warnings and bad options init.