Fix invalid js preventing traits from working