Sometimes you gotta hate php...