Added preferences dialog

Hmmm weird...
I removed that line and fixed the other error.