fixed bugs with paths, database path