fixed handling nil int64