fixing bash variable issue