Fix enhancements #30 and #31