Fixes and new test cases, to have less fixes in the future. :)