Fix some shell issues