Force rescan if $mine parameter is set
fix site upgrade handling