Fixed handling of lists in mysql database