fix karma functionality