(try again) fix 2 bugs
(try again)
fix 2 bugs

- optional dependencies not supported
- incorrect index determination


marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core,marcosptf/pear-core