fig bug javascrip