Quick fix on state setting