Bug fix on CurrentState keyword