 			
 			atf.position 	= 6;
 			
-			_atfFormat 		= atf.readUnsignedByte() & 3;
+			var formatByte 	: uint = atf.readUnsignedByte();
+			
+			_atfFormat 		= formatByte & 7;
 			_width 			= 1 << atf.readUnsignedByte();
 			_height 		= 1 << atf.readUnsignedByte();
 			_mipmap 		= atf.readUnsignedByte() > 1;

			}
			else if (_atf)
			{
				_texture.uploadCompressedTextureFromByteArray(_atf, 0, false);
			}
		}
		

				if (_texture)
					_texture.dispose();
				
				var format : String = FORMAT_BGRA;
				
				if (_atf)
				{
					if (_atfFormat == 5)
						format = FORMAT_COMPRESSED_ALPHA;
					else if (_atfFormat == 3)
						format = FORMAT_COMPRESSED;
				}
				
				_texture = context.createTexture(
					_width,
					_height,
					format,
					_bitmapData == null && _atf == null
				);

