Fix truncating bug