Made some changes to keep things more consistent with servlet containers