make field flexible ratio and fix state bug