fixed some minor db and validation bugs