fixing issues with modal