fixed gem loading and date format issues