Merge two pulls

This is a combination of #1113 and #1115 to see how it works in TC