Fixed bug involving jpeg extension.