fixed bug with parsing request headers