https://www.imperialviolet.org/2014/02/22/applebug.html