Fixes a bug in ttl generated