get_the_category()[0] is breaking in some PHP versions.
Corrected for compatibility.