Upgrade procedure updated.
Wrong import statement fixed.
Wrong queries fixed.

see #469