Add function to prevent popup of figures