fixes is #289

atom was parsing badly when stream had a @ in it. Also added tests