Fixes a bunch of PHP notices