Fix trait in different file formats