bug fix for serial rotation