treat return value as a long

can't believe it's taken this long to notice.