fixes some issue with test data insertion in db