Changed from shell to bash to finally fix the pause issue.