fixed warnings and made rotation correct for imagefragment