fixed warnings and compilation problem