some fixes for previous commit