fix hidden objects' paths leaking into the next object (issue #40)