Crm 13698

this PR consists of 2 commits, one is of the actual fix and other one is minor improvement after i encountered  'DB: no such table' error during upgrade check from 4.3.6 => 4.4.1