fixed a small error in the checkCompulsory() method