Added content type and fixed bug with debug