add max width for fields
fix database saving