fixing template bug with empty div