add tests for bugs