Fix generic class.
Added workaround for static method calls. See issue #20.