Fix bug in mixin