Fixed some bugs with preferences

Fixed 64bit support