Bug fixes & BAM related fixes