fixed: maj/min bug