Fix mimetype condition check (Fixes #24)