fixed warnings in code