Minor bugfixes
Tested on 5.x and 6.x VMs