Replace a deprecated call in getMessageAsArray

There are probably more of these in here.