fixed opportunity bug