fixed bug in Barbosa generator