Made some minor bug fixes with setFocus