Fixed bug of local variable in wrong scope in Jpeg class