Truly fixed #48. Found another condition in which the issue would arise. Fixed and added new unit tests for it :)