Patch update to 5.0.4.

Official update which includes latest code from developer version.