Improved rotation detection, fixed black toolbar bug