Fix mining shit.  Fixes Redmine #68, Fixes redmine #69.