resize before setOption bug fix