added unittest for action module and resulted in bug fixes.