Fix contentType detection