fix stupid cm shit and add sm flags