fixed miscellaneous rotation related bugs