fixed bugs, added rollback for tests