Minor bug fixes in plotting routines