Fixes some flex bugs for Mac