diff --git a/test_pg.sh b/test_pg.sh
index 0087c0b57016d52a096bf5107a2f5681a9e9397d..b9b96655fedbd3e030c969ff5fba677f99d1faa6 100644
--- a/test_pg.sh
+++ b/test_pg.sh
@@ -17,7 +17,7 @@ trap 'start_pg_cleanup' EXIT INT
 createdb goatherd_test
 
 echo Waiting for compile to finish
-wait
+wait %1
 
 echo
 echo ===== Tests =====