Merge branch 'BAM5-master'
Fixes bugs