fixed doc and isinstance