Fixed scoping issue with behaviours`