How to handle StaleElementReferenceException including error executing JavaScript

while running the code, no problem occurs for the first selectobject. I'm getting the error for second selectobject. For the first one, I'm selecting a brandtype in combobox and doing the same thing by selecting prefix range from other combobox named prefix. Why is this javascript error coming up? How can I handle it? any solution? I checked the reasons from seleniumhq web site but the issues like element deletion or not being attached to DOM is not giving a solution to me.

Error content:

Exception in thread "main" org.openqa.selenium.StaleElementReferenceException: Error executing JavaScript

Code:

    Select selectObject = new Select (driver.findElement(By.xpath("//select[@name='brand']")));
    selectObject.selectByValue("MC");

    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

    Select selectObject2 = new Select (driver.findElement(By.xpath("//select[@name='prefix']")));
    selectObject2.selectByValue("546");

HTML:

<SELECT onchange="document.form2.elements['stdate'].value=document.form1.elements['stdate'].value;document.form2.elements['gsmnotype'].value=document.form1.elements['gsmnotype'].value;document.form2.elements['brand'].value=document.form1.elements['brand'].value;document.form2.elements['prefix'].value=document.form1.elements['prefix'].value;document.form2.submit()" name=prefix> <OPTION value=53>53</OPTION><OPTION value=541>541</OPTION><OPTION selected value=542>542</OPTION><OPTION value=543>543</OPTION><OPTION value=50>50</OPTION><OPTION value=544>544</OPTION><OPTION value=545>545</OPTION><OPTION value=546>546</OPTION><OPTION value=549>549</OPTION><OPTION value=55>55</OPTION></SELECT>