zero-size-component problem does not seem to matter, but added some code that makes it easy to deal with if it becomes an issue