State Table Changes

Fixed up end case, sending back to begin0 instead of to begin5