Added $max support (in update operation)