Fix codegen on short types