Some fixes in mixin.js