fixes from traian's review