Fixed a slight issue with a NULL return (typically occurred when a 404 was given)