Strange behavior of mpu-6050 + hmc5883l

Hi,
I'm doing camera stabilizer using accel + gyro + mag readings. To compute pitch, roll and yaw angles I'm using mpu-6050 + hmc5883l and FreeIMU library. I have strange problem with that. When i rotate the sensor -90 degress to the right or +90 to the left, the roll angle in console is correct. The problem is with pitch angle. When I'm rorating the sensor ahead +90 degress or -90 it also affects roll angle and I don't know why. In other words: when I'm changing only roll angle everyting is correct and pitch doesnt change while that, but when i'm changing pitch angle also the roll is changing. You can see that on the movie i uploaded to youtube. I also calibrated magn+accel so I don't have any idea what might be wrong, any ideas? Is it possible that my mpu-6050 is broken?

Didn't see you do any Yaw in that video.

KenF:
Didn't see you do any Yaw in that video.

I didn't do that because Yaw is correct, does it matter? The problem is only with pitch angle. If that will help i can upload video with yaw also.

Is it possible that my mpu-6050 is broken?

It is MUCH more likely that the program is wrong. Please read the "How to post" message.

jremington:
It is MUCH more likely that the program is wrong. Please read the "How to post" message.

I also think that it is caused by invalid program but is it possible? I downloaded FreeIMU library from that link http://www.varesano.net/files/FreeIMU-20121122_1126.zip and I haven't changed anything. I'm using the processing file FreeIMU_cube and the example sketch FeeIMU_quaternion which looks like this:

#include <ADXL345.h>
#include <bma180.h>
#include <HMC58X3.h>
#include <ITG3200.h>
#include <MS561101BA.h>
#include <I2Cdev.h>
#include <MPU60X0.h>
#include <EEPROM.h>

//#define DEBUG
#include "DebugUtils.h"
#include "CommunicationUtils.h"
#include "FreeIMU.h"
#include <Wire.h>
#include <SPI.h>

float q[4];

// Set the FreeIMU object
FreeIMU my3IMU = FreeIMU();

void setup() {
Serial.begin(115200);
Wire.begin();

delay(5);
my3IMU.init();
delay(5);
}

void loop() {
my3IMU.getQ(q);
serialPrintFloatArr(q, 4);
Serial.println("");
delay(20);
}