Fixed some bug with creating of new tables