fix#3 + fix karma tests