Cast $flags to array when appending new message
#124
Merged
$flags to array when appending new message
#124