Fixed an error in bash logic.