Improve reliabiltiy of resizing function
changelog for v0.1.32