Major flaw saving to wrong database