fix types and sizes