Return ID - Function

First glance,

return ID;

you mean:

return channelID;

?