Php fixes

Fixed some PHP notices