Set HTTp statuscode properly