Fixed error in getDatagramsWraper