fixed crash with empty data
fixed rotation issue
Merge pull request #1 from philipheinser/master

fixed crash with empty data