Feature/issue 108

Fix most bogus profile problems. There's one I wasn't able to reproduce, which might be fixed (will be caught by the script to be introduced by #140). There's also one that exists because of #139.