fixing modal animation bugs