fixes by Shlomi Fish