fixes from code reivew