Fix lint issues and reorder warning