Fixed error when updating database version