State updater fix

This should fix state update related issues: #237 and a missing bit of #210 (the infinite/very long loop in rendering).