Only delete elements if they are pixels

Fixes #6