Fix warnings in the code