bugfix: fix a few more bugs from the latest batch of changes