Evaluate Javascript correctly