fixes (thanks, Ivan)