fixed warnings and other issues