Added tests and detected an issue