bug on calling modal