Fixes most of #9