fixes (halfly tested)