fixed merging issues --- crashes due to database error, working on it