Options were getting overwritten on resize