Selecting the correct method on Base and Derived classes

Addresses the issue described in #64. The build script succeeded on my machine.