Fixed bug with no possibility to save settings
Added python 3 compatibility