Fixes Issue 16 and Issue 18