Works with multiple commands, but get wrong enties after 2 commands