fix switching refresh rates
Merge pull request #4410 from FernetMenta/res

fix switching refresh rates