Fixed time issues with loading from databse