fix ugly way of control type