Replace not valid with invalid