bug fixes, improvements, and other things I forgot