Various bug fixes to hourglass generator.