diff --git a/run-aa-test b/run-aa-test
index ad6ec39bd77d976c4606991e96913e9b71141800..6f8741bbd57fad97e75fe548ba4a4d9e18bbd3de 100755
--- a/run-aa-test
+++ b/run-aa-test
@@ -60,8 +60,9 @@ TEST_TITLE=$( basename ${EXPECT_FILE} )
 # Touch .bash_history, which we use in some tests, if it's not there.
 bash_history="/home/${CHAIWALA_USER}/.bash_history"
 if [ ! -r ${bash_history} ]; then
-	RET=$( sudo -u ${CHAIWALA_USER} touch ${bash_history} )
-	if [ $RET != 0 ]; then
+	sudo -u ${CHAIWALA_USER} touch ${bash_history}
+	RET=$?
+	if [ "$RET" != "0" ]; then
 		echo "Failed to create .bash_history: $RET"
 		exit 1
 	fi