some fixes for getting output