Applied steps from #37 should Fixed #39.

Follow steps from #37. I'm not sure how to write a test for this :(

This should fix #39 if all code is in.