resolve bug with validation