Implement some internal fixes