fixing read-only exception in firefox