fixed teh bug