fixed a couple of bugs with WSH api and discovered a 512k inclusion bug in the WSH framework