Some improvements to custom controls