Fix database syntax problems, manage members