Added tests and small change in fix