Fixes bug when generated where part is empty