Fixing for sqla 7.*