fix errors pointed out by @pluma