fixed compiler warnings inv vs long