Fix bug with syntax mode, allow tests to be run in test mode with -r