UPDATE statement fixes and made schema stricter