Modified logic of Response class render method and constructor