cleanup of test request logic and bugfix