bash script bug fixes