fix some issues with operator checking