fixing some minor bugs only found on sfdc machines