Fixed bug where SGV time was reported incorrectly
Added boundary checking to avoid unwanted exceptions