Re-ran the unit tests and some of them were failing. Updated the code accordingly.