fixed issue with empty opportunities