Changed the function that strips the ':' character from the end of the device name