fix code for dart2js