ring: fix declaration after statement