try to fix a bug in matal.js