Fix generics covariance issues

Fixes #24