More tests with bug fixes