Fix the custom base class option + unit tests