Fixed a bug in enforcing friction cone on slopes