diff --git a/hpvm/llvm_installer/llvm_installer.sh b/hpvm/llvm_installer/llvm_installer.sh
index 29d629c3f64efff3fdaf1bddedbeb87e071f9642..a972fb62adf907147d747d9003bc3524ef7dec3d 100755
--- a/hpvm/llvm_installer/llvm_installer.sh
+++ b/hpvm/llvm_installer/llvm_installer.sh
@@ -21,10 +21,15 @@ LIBCXXABI_SRC="libcxxabi-$VERSION.src"
 
 AUTOMATE="y"
 
-read -n 1 -p "Build and install HPVM automatically? (y or n): " AUTOMATE   
+read -p "Build and install HPVM automatically? (y or n): " AUTOMATE   
+
+if [ ! $AUTOMATE == "y" ] && [ ! $AUTOMATE == "n" ]; then 
+  echo invalid input!
+  exit -1
+fi
 
 echo
-read  -n 2 -p "Number of threads: " NUM_THREADS
+read -p "Number of threads: " NUM_THREADS
 
 if [ ! $NUM_THREADS -gt 0 ]; then
   NUM_THREADS = 2