Fix mistakes in the code