fixed: bug of always maj codes