Fix #26

This fixes both problems within the issue.