fixed problem and const for X