Fixes following @cpeterso's requests.