Use correct function for taking items off channel in thread.