db prepare fix