a few small changes / fixes added check for OP.