fix dropdown closing bug