Fixed a few bugs with notification conversion.
Fixed some php notices.