fixing up some compiler warnings around signedness