Did some research on pseudo-terminals
Fixed a bug where shell inputs could arrive out-of-order