added warning and fix