PHP warning fixes