fixed some of the buggs found during test, further test awaits
Merge pull request #324 from reem-utils/fix_sergi

fixed some of the buggs found during test, further test awaits