FIX chain update query if it was not present in db previously
Merge pull request #1 from enapps/master

FIX chain update query if it was not present in db previously