Backport some fixes to releng/10.0:

https://github.com/pcbsd/pcbsd/commit/bc9de1294272487ce2af4cada257b9f20208206b
https://github.com/pcbsd/pcbsd/commit/827c417a21bc065273226b75b37e204e1539bfe3