Fixed theta tracking bug in output