Fix derivative printing, add tests