fixing bad behavior