better error handling (just in case), plus fix for adding seconds to the time information.