some fixes for the previous commit