Fixed warnings in the code