working on fixing rotate crash bug