Fixed errors, works with multiple and single commands