Fixed issue with shell output repeating outputs