Fix bug in Shell