Fixing modal bug