added friction compensation (mostly cherry-picked from devel, but some changes were needed for compatibility)
What issues does this fix?