Fix #192

Performance + fix compatible with current composer plugin