Some bug fixes for the figures