fixed error in sizeof function