fix "figure margins too large" bug