Minor casting to address compiler warnings