Bugfix in BamResource