fixed bugs with sttings