Added logic to update object types on a selection