Fixed the bug in variable encoding for longs.