a lot of fixes
fixed distortion problem