Should fix #52
More work on #41