Fix for using "extends"

Closes #4