from ubuntu: fixed sizeof(long) bug, fixed size of ui