minor fixes + improvements