some fixes in legacy code about standards