bug fixes for freezing issue, added shell script