fixed warnings displayed twice