fixed warnings and compilation issues