fixed issue with protected buildType method