Hi Pierdek,
This seems right, but I want to step through it a bit. Do you mind submitting a pull request?