Fixed a few bugs in shellcraft