fix & tests