Update flex.js

Fix unit bug