Some oversights in last commit (these commits should really be squashed before merging)