Fixed minor bugs
added target-input option