fixed preference crash, closes #51. also im really dumb (seriously, how did that *EVER* work!?)