Fixes for three of mrcoolbp's issues

Fixes for #311, #312, #313