refresh rate fix and squashed a few bugs