fixed issue in which rotation would break files

May have somewhat broken the rotation altogether though...