Fixes based on @mramato comments.