Fixed a few warnings generated by Custom_Post class.