Fixed bug in getControlType thanks to @liesrock