Fixed inconsistencies in db design