fix PICA to use mimeType instead of type and update tests