After some hours of debuging.