fixing modal bug