fixed bug in bin/rmails