Bug fix for Modal issue