Fix database length of attributes