Portabilized a bit