ifixed a few bugs with not being RFC complient