Fix for custom states.