fixed some non-straightforward things