Fixes #5 - Still needs some testing