fixed issue with applying css classes to the last menu item