fixed huge bug caused by wrong regional settings